package com.company.matrix;

import java.util.ArrayList;
import java.util.HashSet;

public class CountServers {

    public static class Server{
        int x = 0;
        int y = 0;

        public Server(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    public int countServers(int[][] grid) {
        HashSet<Server> connectedServers=new HashSet<>();
        ArrayList<Server> allServers=new ArrayList<>();
        //server化
        for (int i = 0; i < grid.length; i++) {
            for (int j = 0; j < grid[i].length; j++) {
                if (grid[i][j]==1) {
                    allServers.add(new Server(i,j));
                }
            }
        }
        return 0;
    }
}
